package com.hwadee.backend.controller;

import com.hwadee.backend.entity.DataAnalysis.BasicData;
import com.hwadee.backend.service.HealthDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@RestController
@RequestMapping("/healthData")
public class HealthDataController {
    @Autowired
    private HealthDataService healthDataService;

    @GetMapping("/getDataToAnalysis/{userId}")
    public List<BasicData> getHealthData(@PathVariable Integer userId) {
        return healthDataService.getHealthDataByUserId(userId);
    }
}